package com.crm.service.customerManager;

import com.crm.model.entity.customerManager.CustomerPay;
import com.crm.model.qo.customerManager.CustomerPayQO;
import com.crm.model.vo.customerManager.CustomerPayAllInfoVO;
import com.crm.model.vo.customerManager.CustomerPayDetailVO;
import com.crm.model.vo.customerManager.CustomerPayVO;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author:chaifuyou
 * @Date: 2021/4/30 9:48
 */
public interface CustomerPayDbService {

    /**
     * 客户充值列表
     * @param dateUnit
     * @param order
     * @return
     */
    List<CustomerPayVO> selectCustomerPayList(Integer dateUnit, StringBuilder order, CustomerPayQO qo);

    /**
     * 添加客户充值信息
     * @param customerPay
     */
    Integer saveCustomerPay(CustomerPay customerPay);

    /**
     * 通过id查询客户充值信息
     * @param chsCustomerPayId
     * @return
     */
    CustomerPay selectCustomerPayById(String chsCustomerPayId);

    /**
     * 修改充值信息
     * @param cpay
     * @return
     */
    Integer updateCustomerPay(CustomerPay cpay);

    /**
     * 财务确认收款
     * @param
     */
    boolean notarizeCustomerPay(CustomerPay customerPay);

    /**
     * 根据客户充值id查看充值详情
     * @param customerPayId
     * @return
     */
    CustomerPayDetailVO queryCustomerPayDetail(String customerPayId);

    BigDecimal selectPayMoneyCount(String customerPayId,Integer dateUnit);

    /**
     * 通过客户id和充值金额查询
     * @param customerId
     * @param customerPay
     * @return
     */
    List<CustomerPay> selectCustomerId(String customerId, BigDecimal customerPay);

    /**
     * 根据主键查询
     * @Param chsCustomerPayId
     * @Author xielinqi
     * @Date 11:32 上午 2021/11/11
     */
    CustomerPay selectByPrimaryKey(String chsCustomerPayId);

    /**
     * 修改付款信息
     * @Param cp
     * @Author xielinqi
     * @Date 1:54 下午 2021/11/11
     */
    int updatePayInfo(CustomerPay cp);

    /**
     * 查看详情
     * @Param customerPayId
     * @Author xielinqi
     * @Date 3:38 下午 2021/11/11
     */
    CustomerPayAllInfoVO queryDetail(String customerPayId);
}
